//通用组件样式
.arco-btn {
  &.arco-btn-shape-square {
    border-radius: @border-radius-4;
  }
}

.arco-input {
  &:not(.arco-input-disabled) {
    &:hover {
      background-color: unset;
      border-color: @primary;
    }
    &.arco-input-error {
      border-color: @error-color;
    }
  }
  &.arco-input-disabled {
    border-color: @border-color;
    &:hover {
      background-color: unset;
    }
  }
}

.arco-textarea {
  &:not(.arco-textarea-disabled) {
    &:hover {
      background-color: unset;
      border-color: @primary;
    }
  }
  &.arco-textarea-disabled {
    &:hover {
      border-color: @border-color;
      background-color: transparent;
    }
  }
}

.m-input-none {
  background: none;
  &:focus {
    background-color: transparent !important;
    border-color: transparent !important;
  }
  &:hover {
    border-color: transparent !important;
    background-color: transparent !important;
  }
}

.m-input {
  height: @field-height;
  background: none;
  border-color: @border-color;
  border-radius: @border-radius-4;
  .arco-input-inner-wrapper:not(.arco-input-inner-wrapper-disabled) {
    background: unset;
    border: 1px solid @border-color;
    border-radius: @border-radius-4;
    &:hover {
      border: 1px solid @primary;
    }
  }
  .arco-input-inner-wrapper-error:not(.arco-input-inner-wrapper-disabled) {
    border-color: transparent;
    background: rgba(@error-color, 0.1);
    &:hover {
      border-color: @error-color;
      background: rgba(@error-color, 0.2);
    }
    &.arco-input-inner-wrapper-focus {
      border-color: @error-color;
      background: transparent;
    }
  }
  .arco-input-inner-wrapper-disabled {
    border-color: @border-color;
    background-color: @border-color;
    &:hover {
      background-color: @border-color;
    }
  }
  &.arco-input-error:not(.arco-input-disabled) {
    border-color: transparent;
    background: rgba(@error-color, 0.1);
    &:hover {
      border-color: @error-color;
      background: rgba(@error-color, 0.2);
    }
    &:focus {
      border-color: @error-color;
      background: transparent;
    }
  }
  &.arco-input-disabled {
    border-color: @border-color;
    background-color: @border-color;
    &:hover {
      background-color: @border-color;
    }
  }
}
.m-input-area {
  background: none;
  border-color: @border-color;
  border-radius: @border-radius-4;
  &.arco-textarea-error:not(.arco-textarea-disabled) {
    border-color: transparent;
    background: rgba(@error-color, 0.1);
    &:hover {
      border-color: @error-color;
      background: rgba(@error-color, 0.2);
    }
    &:focus {
      border-color: @error-color;
      background: transparent;
    }
  }
  &.arco-textarea-disabled {
    border-color: @border-color;
    background-color: @border-color;
    &:hover {
      background-color: @border-color;
    }
  }
}
.m-select {
  height: @field-height;
  .arco-select-view {
    background-color: transparent;
    border-color: @border-color;
    border-radius: @border-radius-4;
  }
  &:hover {
    .arco-select-view {
      border-color: @primary;
      background-color: transparent;
    }
  }
  &.arco-select-error:not(.arco-select-disabled) {
    .arco-select-view {
      border-color: @error-color;
      background-color: rgba(@error-color, 0.1);
      &:hover {
        border-color: @error-color;
        background-color: rgba(@error-color, 0.2);
      }
    }
    &.arco-select-focused {
      .arco-select-view {
        border-color: @error-color;
        background-color: transparent;
      }
    }
  }
  &.arco-select-disabled {
    .arco-select-view {
      border-color: @border-color;
      background-color: @border-color;
      &:hover {
        background-color: @border-color;
      }
    }
  }
}

.m-tree-select {
  height: @field-height;
  .arco-tree-select-view {
    background-color: transparent;
    border-color: @border-color;
    border-radius: @border-radius-4;
  }
  &:hover {
    .arco-tree-select-view {
      border-color: @primary;
      background-color: transparent;
    }
  }
  &.arco-tree-select-error:not(.arco-tree-select-disabled) {
    .arco-tree-select-view {
      border-color: @error-color;
      background-color: rgba(@error-color, 0.1);
      &:hover {
        border-color: @error-color;
        background-color: rgba(@error-color, 0.2);
      }
      &:focus {
        border-color: @error-color;
        background-color: transparent;
      }
    }
  }
  &.arco-tree-select-disabled {
    .arco-tree-select-view {
      border-color: @border-color;
      background-color: @border-color;
      &:hover {
        background-color: @border-color;
      }
    }
  }
}
// 日期选择器
.m-date-picker {
  .bw-100;
  height: @field-height;
  border-color: @border-color;
  border-radius: @border-radius-4;
  background-color: transparent;
  &:not(.arco-picker-disabled) {
    &:hover {
      background-color: unset;
      border-color: @primary;
    }
    &.arco-picker-error {
      border-color: @error-color;
    }
  }
  &.arco-picker-disabled {
    border-color: @border-color;
    background-color: @border-color;
    &:hover {
      background-color: @border-color;
    }
  }

  &.arco-picker-error:not(.arco-picker-disabled) {
    border-color: transparent;
    background: rgba(@error-color, 0.1);
    &:hover {
      border-color: @error-color;
      background: rgba(@error-color, 0.2);
    }
    &.arco-picker-focused {
      border-color: @error-color;
      background: transparent;
    }
  }
}

.table {
  .arco-table-container {
    border: none;
    &::before {
      content: '';
      background-color: transparent;
      height: 0;
    }
  }
  th {
    // color: @text-second-color;
    // background-color: transparent;
    border-color: @border-color !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }
  td {
    font-size: 13px;
    color: @text-second-color;
    border-color: @border-color;
    border-left: none !important;
    border-right: none !important;
  }
}
//  src/components/svg/*.svg 这个目录下的svg自动加上该样式，针对这些图标可以换颜色
.svg-icon {
  path {
    fill: currentColor !important;
  }
}

// 普通页面必须加上
.page {
  box-sizing: border-box;
  width: 100%;
}
.list-page {
  .action-bar {
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid rgba(235, 237, 242, 1);
  }
  .page-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  }
}

// 详情页面
.detail-page {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  .action-bar {
    margin: 20px 20px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
  }
  .detail-content {
    flex: 1;
    height: 1px;
    .scroll-bar-h-min;
    padding-top: 10px;
  }
  .detail-card {
    border-radius: 10px;
    background-color: white;

    .detail-card-title {
      display: flex;
      flex-direction: row;
      padding: 20px;
      border-bottom: 1px solid @page-bg-color;

      .line-dot {
        width: 5px;
        height: 20px;
        border-radius: 5px;
        background-color: @primary;
        margin-right: 20px;
      }
    }

    label {
      color: @text-second-color;
    }
  }
}

// 详情内item字段验证错误时的提示
.float-error-block {
  position: relative;

  .float-error {
    position: absolute;
    text-align: left;
    right: 0;
    width: 100%;
    bottom: -16px;
    color: @error-color;
    max-lines: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }
}
// 复制组件
.copy-to-clipboard {
  .text-area {
    width: 0;
    height: 0;
    position: fixed;
    right: 0;
    bottom: 0;
    opacity: 0;
  }
}
// 富文本编辑器
.html-editor {
  border: 1px solid @border-color;
  border-radius: @border-radius-8;
  .tool-bar {
    border-bottom: 1px solid @border-color;
  }
}

.loading-mask {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background-color: rgba(#000, 0.1);
  // color: white;
  z-index: 99999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
